import CommonPanel from './CommonPanel';
import {wrapperType, EnumControlType, ITabsFields, layouts, ITabPanel} from "@/pages/dv/constants/EnumCommon";

export default class IFrame extends CommonPanel{

  /**
   * 基础配置枚举
   */
  getPrivatePanes(): ITabPanel[] {
    return [
      {title: '常用', value: 'src', fields: this.otherConfig()},
    ]
  }
  otherConfig(): ITabsFields[]{
    return [
      {
        formItemProps: {
          name: 'src',
          label: '文档URL'
        },
        layout: layouts.vertical,
        controlType: EnumControlType.TextArea,
      },
      {
        formItemProps: {
          name: 'name',
          label: 'name'
        },
        layout: layouts.vertical,
        controlType: EnumControlType.Input,
      },
      {
        formItemProps: {
          name: 'scrolling',
          label: '是否显示滚动条'
        },
        layout: layouts.vertical,
        controlType: EnumControlType.RadioGroup,
        data: [
          {value: 'yes', label: 'yes'},
          {value: 'no', label: 'no'},
          {value: 'auto', label: 'auto'},
        ]
      },
      {
        formItemProps: {
          name: 'allowFullScreen',
          label: '是否允许全屏',
          valuePropName: 'checked'
        },
        controlType: EnumControlType.Switch,
      }
    ]
  }
}
